﻿using System;
using Rabbit.Logic;
using RabbitShop.Code;

namespace RabbitShop.UI
{
    public partial class UserDetail : System.Web.UI.Page
    {
        protected Customer item = new Customer();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Cookies[Constant.CookieName] != null)
            {
                string id = Request.Cookies[Constant.CookieName].Values[Constant.CookieUid];
                if (string.IsNullOrEmpty(id)) Response.Redirect("UserLogon.aspx");
                item = RabbitUse.GetCustomerById(Db.Store, id);
            }
            else
            {
                Response.Redirect("UserLogon.aspx");
            }
        }
    }
}